{template 'common/header'}
<ul class="nav nav-tabs">
    <li class="active"><a href="">编辑信息</a></li>
    <li><a href="{php echo $this->createWebUrl('BookInfo');}">返回列表</a></li>
</ul>

<div class="main">
    <form class="form-horizontal" action="" role="form" method="post">
        <input type="hidden" name="token" value="{$_W['token']}" />
        <input type="hidden" name="infoid" value="{$row['id']}" />

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">名称</label>
            <div class="col-sm-4">
              <input type="text" name="data[name]" value="{$row['name']}" class="form-control">
            </div>
        </div>
                
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">区域</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[zone]">
                    <option value="0">请选择分类</option>
                    {loop $zoneparents $key $parent}
                        <option value="{$parent['id']}" {if $row['category'] == $parent['id']} selected {/if}>{$parent['name']}</option>
                        {loop $parent['sub'] $sub}
	                      <option value="{$sub['id']}" {if $row['category'] == $sub['id']} selected {/if}>&nbsp;&nbsp;|—{$sub['name']}</option>
	                    {/loop}
                    {/loop}
                    
                </select>
            </div>
        </div>
        
        <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">分类</label>
            <div class="col-sm-4">
                <select class="form-control" name="data[category]">
                    <option value="0">请选择分类</option>
                    {loop $parents $key $parent}
                        <option value="{$parent['id']}" {if $row['category'] == $parent['id']} selected {/if}>{$parent['name']}</option>
                        {loop $parent['sub'] $sub}
	                      <option value="{$sub['id']}" {if $row['category'] == $sub['id']} selected {/if}>&nbsp;&nbsp;|—{$sub['name']}</option>
	                    {/loop}
                    {/loop}
                    
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">电话</label>
            <div class="col-sm-4">
              <input type="text" name="data[mobile]" value="{$row['mobile']}" class="form-control">
            </div>
        </div>
        
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">地址</label>
            <div class="col-sm-4">
              <input type="text" name="data[address]" value="{$row['address']}" class="form-control">
            </div>
        </div>

        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">认证</label>
            <div class="col-sm-4">
              <select class="form-control" name="data[isauth]">
                <option value="1" {if $row['isauth'] == 1}selected{/if}>是</option>
                <option value="0" {if $row['isauth'] == 0}selected{/if}>否</option>
              </select>
            </div>
        </div>
        <div class="form-group">
        	<label for="inputEmail3" class="col-sm-2 control-label">地图{php echo $row['coordinate']->lng;}</label>
	        <div class="col-sm-4">
	           	{php echo tpl_form_field_coordinate('data[coordinate]', array('lng'=>$lng,'lat'=>$lat));}
	           	<!-- <iframe width="650px" height="400px" src="http://apis.map.qq.com/uri/v1/marker?marker=coord:39.892326,116.342763;title:超好吃冰激凌;addr:手帕口桥北铁路道口;referer:Thinkidea;"></iframe> -->
	           	<!-- <iframe width="100%" height="400px" src="http://api.map.baidu.com/marker?location={$lat},{$lng}&title={$row['name']}&content={$row['address']}&output=html"></iframe> -->
	        </div>   			
	    </div>       		
	            	
	            		
	            	
	            		
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="submit" class="btn btn-primary" name="save_info" value="提交">
            </div>
        </div>
    </form>
</div>
{template 'common/footer'}